Optimal. Leaf size=40 \[ a^2 x+\frac {b (2 a+b) \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {4128, 390, 203} \[ a^2 x+\frac {b (2 a+b) \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 390
Rule 4128
Rubi steps
\begin {align*} \int \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+b+b x^2\right )^2}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\operatorname {Subst}\left (\int \left (b (2 a+b)+b^2 x^2+\frac {a^2}{1+x^2}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {b (2 a+b) \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f}+\frac {a^2 \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=a^2 x+\frac {b (2 a+b) \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.37, size = 106, normalized size = 2.65 \[ \frac {4 \sec ^3(e+f x) \left (a \cos ^2(e+f x)+b\right )^2 \left (3 a^2 f x \cos ^3(e+f x)+2 b (3 a+b) \sec (e) \sin (f x) \cos ^2(e+f x)+b^2 \tan (e) \cos (e+f x)+b^2 \sec (e) \sin (f x)\right )}{3 f (a \cos (2 (e+f x))+a+2 b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 58, normalized size = 1.45 \[ \frac {3 \, a^{2} f x \cos \left (f x + e\right )^{3} + {\left (2 \, {\left (3 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}\right )} \sin \left (f x + e\right )}{3 \, f \cos \left (f x + e\right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 53, normalized size = 1.32 \[ \frac {b^{2} \tan \left (f x + e\right )^{3} + 3 \, {\left (f x + e\right )} a^{2} + 6 \, a b \tan \left (f x + e\right ) + 3 \, b^{2} \tan \left (f x + e\right )}{3 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.03, size = 48, normalized size = 1.20 \[ \frac {a^{2} \left (f x +e \right )+2 a b \tan \left (f x +e \right )-b^{2} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (f x +e \right )\right )}{3}\right ) \tan \left (f x +e \right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 44, normalized size = 1.10 \[ a^{2} x + \frac {{\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} b^{2}}{3 \, f} + \frac {2 \, a b \tan \left (f x + e\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.58, size = 42, normalized size = 1.05 \[ \frac {\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^3}{3}-\mathrm {tan}\left (e+f\,x\right )\,\left (b^2-2\,b\,\left (a+b\right )\right )+a^2\,f\,x}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________